YES 0.6950000000000001 H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/Queue.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:



HASKELL
  ↳ BR

mainModule Queue
  ((addToQueue :: Queue a  ->  a  ->  Queue a) :: Queue a  ->  a  ->  Queue a)

module Queue where
  import qualified Prelude

  data Queue a = [a] [a] [a


  addToQueue :: Queue a  ->  a  ->  Queue a
addToQueue (Q xs ys xs'y makeQ xs (y : ys) xs'

  listToQueue :: [a ->  Queue a
listToQueue xs Q xs [] xs

  makeQ :: [a ->  [a ->  [a ->  Queue a
makeQ xs ys [] listToQueue (rotate xs ys [])
makeQ xs ys (_ : xs'Q xs ys xs'

  rotate :: [a ->  [a ->  [a ->  [a]
rotate [] (y : _) zs y : zs
rotate (x : xs) (y : yszs x : rotate xs ys (y : zs)



Replaced joker patterns by fresh variables and removed binding patterns.

↳ HASKELL
  ↳ BR
HASKELL
      ↳ COR

mainModule Queue
  ((addToQueue :: Queue a  ->  a  ->  Queue a) :: Queue a  ->  a  ->  Queue a)

module Queue where
  import qualified Prelude

  data Queue a = [a] [a] [a


  addToQueue :: Queue a  ->  a  ->  Queue a
addToQueue (Q xs ys xs'y makeQ xs (y : ys) xs'

  listToQueue :: [a ->  Queue a
listToQueue xs Q xs [] xs

  makeQ :: [a ->  [a ->  [a ->  Queue a
makeQ xs ys [] listToQueue (rotate xs ys [])
makeQ xs ys (vv : xs'Q xs ys xs'

  rotate :: [a ->  [a ->  [a ->  [a]
rotate [] (y : vwzs y : zs
rotate (x : xs) (y : yszs x : rotate xs ys (y : zs)



Cond Reductions:
The following Function with conditions
undefined 
 | False
 = undefined

is transformed to
undefined  = undefined1

undefined0 True = undefined

undefined1  = undefined0 False



↳ HASKELL
  ↳ BR
    ↳ HASKELL
      ↳ COR
HASKELL
          ↳ Narrow

mainModule Queue
  (addToQueue :: Queue a  ->  a  ->  Queue a)

module Queue where
  import qualified Prelude

  data Queue a = [a] [a] [a


  addToQueue :: Queue a  ->  a  ->  Queue a
addToQueue (Q xs ys xs'y makeQ xs (y : ys) xs'

  listToQueue :: [a ->  Queue a
listToQueue xs Q xs [] xs

  makeQ :: [a ->  [a ->  [a ->  Queue a
makeQ xs ys [] listToQueue (rotate xs ys [])
makeQ xs ys (vv : xs'Q xs ys xs'

  rotate :: [a ->  [a ->  [a ->  [a]
rotate [] (y : vwzs y : zs
rotate (x : xs) (y : yszs x : rotate xs ys (y : zs)



Haskell To QDPs


↳ HASKELL
  ↳ BR
    ↳ HASKELL
      ↳ COR
        ↳ HASKELL
          ↳ Narrow
QDP
              ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

new_rotate(:(vz60, vz61), :(vz70, vz71), vz8, vz9, h) → new_rotate(vz61, vz71, vz70, :(vz8, vz9), h)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: